#include <QtCore/QCoreApplication>
#include <iostream>
#include "TcpServer.h"
#include <QTextCodec>

using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());

    cout << "Server start!" << endl;

    TcpServer server(60606);

    if( !server.init() )
    {
        cout << "Server init error!" << endl;
        return -1;
    }
    
    return a.exec();
}
